# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=jwt-cli
pkgver=6.1.1
pkgrel=0
pkgdesc="Super fast CLI tool to decode and encode JWTs"
url="https://github.com/mike-engel/jwt-cli"
# loongarch64: blocked by libc crate
arch="all !loongarch64"
license="MIT"
makedepends="cargo cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://github.com/mike-engel/jwt-cli/archive/refs/tags/$pkgver.tar.gz"


prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/jwt -t "$pkgdir"/usr/bin/
}

sha512sums="
2895348196c642398dc27094012fc2c1f62e3bf0f60a597f96f0c2bb121b350b2f07368390b4203aca470dd5dedf6d82f0d207036b43e23ce21c8d05f1e5c89e  jwt-cli-6.1.1.tar.gz
"
